<template>
  <div>
    <div>我是子组件啊，这是父组件传过来的-----------{{ myname }}</div>
    <button @click="sendmsg">点我发送信息</button>
  </div>
</template>

<script>
export default {
  data () {
    return {}
  },
  props: {
    myname: {
      type: String,
      default: '呵呵呵'
    }
  },
  methods: {
    sendmsg () {
      this.$emit('msgEvent', [
        '10',
        20,
        {
          name: '廖睿'
        }
      ])
    }
  }
}
</script>

<style></style>
